import axios from 'axios'
// import { BASE_URL } from './url'
const API = axios.create({
  baseURL: '/api',
})

API.interceptors.request.use((config) => {
  const { url } = config
  if (
    url.startsWith('/user') &&
    !url.startsWith('/user/login') &&
    !url.startsWith('/user/registered')
  ) {
  }
  return config
})
API.interceptors.response.use((response) => {
  const { status } = response.data
  if (status === 400) {
  }
  return response
})
export { API }
